from wtforms import Form


class BaseForm(Form):
    def get_error(self):
        if self.errors:
            message = self.errors.popitem()[1][0]
            return message

    def validate(self):
        return super(BaseForm, self).validate()
